from urllib import request

response = request.urlopen("https://www.runoob.com/python3/python3-os-file-methods.html")  # 打开网站
fi = open("d:\\Users\\Administrator\\Desktop\\python-demo\\python\\demo\\16.Python OS 文件 目录方法\\cainiao.text", 'w')                        # open一个txt文件
page = fi.write(str(response.read()))                # 网站代码写入
fi.close() 

import os

os.linesep()
